package com.joker.aigc.blog.domain.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @TableName article_comment
 */
@Data
@Schema(name = "文章评论回复-前端")
@AllArgsConstructor
@NoArgsConstructor
public class ArticleCommentVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 博客id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long articleId;

    /**
     * 根评论id，-1代表是根评论
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long rootId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论者uid
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long fromUid;

    /**
     * 被回复者uid
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long toUid;

    /**
     * 这条评论是回复哪条评论的，只有子评论才有（子评论的子评论，树形）
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long toCommentId;

    /**
     * 评论点赞数
     */
    private Integer likeCount;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;


    private List<ArticleCommentVO> children;


}